package com.fifth.apartment.others;

import com.fifth.apartment.result.Result;
import com.fifth.apartment.service.UVService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author Dao
 * @since 2024/7/14
 */
@RestController
//@RequestMapping("/admin/uv")
@Slf4j
//@Api(tags = "UV访问")
public class UVController {
    @Autowired
    private UVService service;

    @GetMapping("uvCount")
    @ApiOperation("统计UV访问数据")
    public Result uvCount(){
        Long count = service.uvCount();
        return new Result(true,"统计成功",count);
    }
}
